<template>
  <ve-pie :data="chartData" :settings="chartSettings" ref="chart"></ve-pie>
</template>

<script>
import resize from './mixins/resize'
export default {
  mixins: [resize],
  data () {
    this.chartSettings = {
      dimension: '热搜商品类',
      metrics: '销售金额占比'
    }
    return {
      chartData: {
        columns: ['日期', '访问用户'],
        rows: [
          { 热搜商品类: '电器', 销售金额占比: 1393 },
          { 热搜商品类: '手机通讯', 销售金额占比: 3530 },
          { 热搜商品类: '零食', 销售金额占比: 2923 },
          { 热搜商品类: '化妆品', 销售金额占比: 1723 },
          { 热搜商品类: '生活用品', 销售金额占比: 3792 },
          { 热搜商品类: '衣服', 销售金额占比: 4593 }
        ]
      }
    }
  },

  mounted () {
    // console.log('---', this.$refs.vePie)
  }
}
</script>
